package com.weitu.risk.service.impl;

import com.weitu.risk.mapper.RepositoryMapper;
import com.weitu.risk.service.RepositoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * Created by fanyuting on 2017/5/15 0015.
 */
@Service
public class RepositoryServiceImpl implements RepositoryService {
    @Autowired
    private RepositoryMapper repositoryMapper;
    @Override
    public List<Map<String, Object>> queryListByParam(Map<String, Object> map) {
        return this.repositoryMapper.queryListByParam(map);
    }

    @Override
    public int queryListCountByParam(Map<String, Object> map) {
        return this.repositoryMapper.queryListCountByParam(map);
    }

    @Override
    public boolean setListToRepository(String[] ids) {
        int result = this.repositoryMapper.setListToRepository(ids);
        if(result<1){
            return false;
        }
        return true;
    }

    @Override
    public boolean deleteFromRepository(String[] ids) {
        int result = this.repositoryMapper.deleteFromRepository(ids);
        if(result<1){
            return false;
        }
        return true;
    }
}
